package cn.momoshenchi.search.controller;

import cn.momoshenchi.R;
import cn.momoshenchi.search.service.OssService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.UnsupportedEncodingException;
import java.util.Map;

/**
 * @version : 1.0
 * @author: momoshenchi
 * @date: 2021/4/28 - 11:24
 */
@RestController
public class OssController
{

    @Autowired
    private OssService ossService;


    @RequestMapping("/oss/policy")
    public R policy() throws UnsupportedEncodingException
    {
        Map<String, String> policy = ossService.policy();
        return  R.ok().put("data",policy);
    }
}
